#!/bin/bash
#
#
COMPRESS_PATH=~/NetBeansProjects/compress
SERVICE_PATH=src/main/webapp/WEB-INF/services

echo "compress *.js and *.css"

#----------------MooTools---------------------
#
#cat ./mootools-core-1.4.5-full-nocompat.js ./mootools-more-1.4.0.1.js  > mootools.js
#/usr/bin/java -classpath $COMPRESS_PATH/rhino-1.6R7.jar \
#              -classpath $COMPRESS_PATH/jargs-1.0.jar \
#              -jar $COMPRESS_PATH/yuicompressor-2.4.2.jar \
#              -o ../../js/mootools.js ./mootools.js

#cp ./mootools.js ../../js/mootools.js
#rm ./mootools.js
#echo "mootools.js Done"

#----------------WebStat---------------------
# js webstat & picker
#cd $SERVICE_PATH/webstat
#cat webstat.js calendar.js customers.js google.js orders.js \
#    pager.js resellers.js showorder.js suggest.js webstatus.js \
#    showbox.js epyVendor.js epyGroups.js epyUser.js epyItemTest.js \
#    epyUpdate.js MakeCoupon.js ItemTracking.js users.js \
#    googleFeed.js categoryMenu.js login.js tabs.js modalBox.js itemsOnGoogle.js \
#    ../datepicker/datepicker.js toolbar.js loader.js > temp.js

#/usr/bin/java -classpath $COMPRESS_PATH/rhino-1.6R7.jar \
#              -classpath $COMPRESS_PATH/jargs-1.0.jar \
#              -jar $COMPRESS_PATH/yuicompressor-2.4.2.jar \
#              -o ../../../js/webstat.js temp.js

#cp temp.js ../../../js/webstat.js
#rm temp.js
#echo "webstat.js Done"

#----------------Tree---------------------

#cd ../tree
#cat CV.Tree.js CV.Tree.Node.js CV.Tree.Hover.js CV.Tree.Selection.js \
#    CV.Tree.Load.js CV.Tree.Draw.js CV.Tree.Drag.js CV.Tree.Drag.Element.js \
#    CV.Tree.Rename.js CV.Tree.Transform.js CV.Tree.Sort.js CV.Tree.Checkbox.js \
#    CV.ContextMenu.js CV.Tree.QuickToolbar.js CV.Tree.Json.js > temp.js

#/usr/bin/java -classpath $COMPRESS_PATH/rhino-1.6R7.jar \
#              -classpath $COMPRESS_PATH/jargs-1.0.jar \
#              -jar $COMPRESS_PATH/yuicompressor-2.4.2.jar \
#              -o ../../../tree/tree.js temp.js

#cp temp.js ../../../tree/tree.js
#rm temp.js
#echo "tree.js Done"


# css webstat & picker
#cd ../webstat
#cat webstat.css ../datepicker/css/dashboard.css > temp.css

#/usr/bin/java -classpath $COMPRESS_PATH/rhino-1.6R7.jar \
#              -classpath $COMPRESS_PATH/jargs-1.0.jar \
#              -jar $COMPRESS_PATH/yuicompressor-2.4.2.jar \
#              -o ../../../css/webstat.css temp.css

#rm temp.css
#echo "webstat.css Done"

#----------------Datepicker---------------------
# images Datepicker

#cp ../datepicker/img/* ../../../img/picker/
#echo "*.img Datepicker Done"

echo "All Done"

exit 0
